<?php

require 'config.php';

function __autoLoad($class){
	$controller_file = CONTROLLER.$class.'.php';
	$system_file = SYS.$class.'.php';
	$smarty_sysPlugins = SYSPLUGINS.$class.'.php';
	$libs_file = LIBS.$class.'.php';
	if(file_exists($system_file)){
		require $system_file;
	} else if(file_exists($controller_file)){
		require $controller_file;
	} else if(file_exists($smarty_sysPlugins)) {
		require $smarty_sysPlugins;	
	} else {
		require $libs_file;
	}
}

$app = new Bootstrap();
?>
